


TerrainTypeManager Struct
-------------------------

Offset 	Size 	Description
------ 	---- 	-----------
0x0 	4 	int numTileMappings
0x4 	4 	TileSetMapping[]* mapping
0x8 	4 	???* 
0xC 	4 	int numTerrainTypes
0x10 	48	TerrainType*[12] terrainType  [Room for 12 or fewer terrain types]




TerrainType Struct
------------------

Offset 	Size 		Description
------ 	---- 		-----------
0x0 	2 		startTile	[first tile in this terrain type set]
0x2 	2 		endTile		[last tile in this terrain type set]
----
0x4 	2 		bulldozedTile	[index of bulldozed tile for this terrain type]
0x6 	2 		rubbleTile	[4 common rubble, followed by 4 rare rubble]
----
0x8 	12 		short[6] Tube
----
0x14	0x20		short[16] Lavawall
0x34	0x20		short[16] Microbewall
0x54	0x20		short[16] Normalwall
0x74	0x20		short[16] Damagedwall
0x94	0x20		short[16] BadlyDamagedwall
----
0xB4 	2 		[3E7] "0" lava
0xB6 	2 		[6] "0" flat tile
0xB8 	2 		[6] "0" flat tile
0xBA 	2 		[1] "0" flat tile
----
0xBC	0x20		short[16] Tube
----
0xDC	14		short[7] ScorchedTile
 0xDC	 2		 scorchedTile
 0xDE	 12		 Range[3]
  0xDE	  2		  short startTile
  0xE0	  2		  short endTile
----
0xEA	
...
0x106	
------


Array Ordering
--------------
Index	Surrounding Tiles
-----	-----------------
0	left, right
1	top, bottom
2	left, bottom
3	right, bottom
4	left, top
5	right, top
6	left, right, top
---
7	left, right, bottom
8	left, right, top, bottom
9	left, top, bottom
10	right, top, bottom
11	bottom
12	top
13	right
14	left
15	middle only


TileSetMapping Struct
---------------------
Size: 8 bytes

Offset 	Size 	Description
------ 	---- 	-----------
0x0 	2 	tileSetIndex	- index of the tileSet that contains this tile
0x2 	2 	tileIndex	- index into the tileSet of this tile
0x4 	2 	numAnimation	- number of alternate tiles that can be displayed in palce of this one (all consecutive in memory)
0x6 	2 	animationDelay	- number of game cycles elapsed before the tile graphic is changed

